package br.ucb.cm.main.mainview.ui;

import java.awt.Dimension;

import javax.swing.JPanel;
import java.awt.FlowLayout;

import br.ucb.cm.config.bean.PieceConfig;
import br.ucb.cm.config.page.integration.ui.PieceButton;

public class PieceCemetery extends JPanel{
	private static final long serialVersionUID = 1L;
	
	public PieceCemetery(int maxWidth) {
		initComponents(maxWidth);
	}

	private void initComponents(int maxWidth) {
		setOpaque(false);
		setMaximumSize(new Dimension(maxWidth, Short.MAX_VALUE));
		setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
	}
	
	public void addPiece(PieceConfig piece){
		add(new PieceButton(piece));
	}
}
